# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-other
pkgname=klevernotes
pkgver=1.1.0
pkgrel=0
pkgdesc="A note-taking and management application using markdown"
# armhf blocked by qt6-qtdeclarative -> kirigami
# ppc64le, s390x, riscv64 and loongarch64 blocked by qt6-qtwebengine
arch="all !armhf !ppc64le !s390x !riscv64 !loongarch64"
url="https://apps.kde.org/klevernotes/"
license="GPL-2.0-or-later"
depends="
	kirigami
	kirigami-addons
	kitemmodels
	qqc2-desktop-style
	"
makedepends="
	extra-cmake-modules
	kconfig-dev
	kconfigwidgets-dev
	kcoreaddons-dev
	ki18n-dev
	kio-dev
	kirigami-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qtsvg-dev
	qt6-qtwebengine-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/office/klevernotes.git"
source="https://download.kde.org/stable/klevernotes/$pkgver/klevernotes-$pkgver.tar.xz"
options="!check" # No tests

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
d83a8b8f06e93f6f3d218fde7ae67dfa51f65dca531a96f96202cf9876a75dcc9f3d798fa3f39ac88dee9bfcd34f99e8389314dae4ba494298699d1a50785ee9  klevernotes-1.1.0.tar.xz
"
